package com.atguigu.stgy.admin.controller;
import com.atguigu.stgy.admin.service.LabelInfoService;
import com.atguigu.stgy.admin.service.impl.LabelInfoServiceImpl;
import com.atguigu.stgy.model.entity.LabelInfo;
import com.atguigu.stgy.model.enums.LabelTypeEnum;
import com.atguigu.stgy.model.result.R;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

import java.util.List;


/**
* 标签信息表(label_info)表控制层
*
* @author xxxxx
*/
@RestController
@RequestMapping("admin/label")
public class LabelInfoController {
/**
* 服务对象
*/
@Resource
private LabelInfoService labelInfoService;

@GetMapping("list")
    public R<List<LabelInfo>> list(@RequestParam(required = false) LabelTypeEnum type ){
 List<LabelInfo>  labelInfos= labelInfoService.listLablesByType(type);
    return R.ok(labelInfos);
}



}
